import request from '@/plugins/request'

export const getDeptList = (data) => {
  return request({
    url: '/org/deptList',
    method: 'post',
    data
  })
}

export const saveDept = (data) => {
  return request({
    url: '/org/saveDept',
    method: 'post',
    data
  })
}

export const deleteDept = (data) => {
  return request({
    url: '/org/deleteDept',
    method: 'post',
    data
  })
}

export const getDeptEmployees = (data) => {
  return request({
    url: '/org/deptStaffList',
    method: 'post',
    data
  })
}

export const saveDeptEmployee = (data) => {
  return request({
    url: '/org/saveDeptStaff',
    method: 'post',
    data
  })
}

export const deleteDeptEmployee = (data) => {
  return request({
    url: '/org/deleteDeptStaff',
    method: 'post',
    data
  })
}

export const getRoleList = (data) => {
  return request({
    url: '/org/roleList',
    method: 'post',
    data
  })
}

export const getRoleUserList = (data) => {
  return request({
    url: '/org/staffRoleList',
    method: 'post',
    data
  })
}

export const saveRoleUser = (data) => {
  return request({
    url: '/org/saveStaffRole',
    method: 'post',
    data
  })
}

export const deleteRoleUser = (data) => {
  return request({
    url: '/org/deleteStaffRole',
    method: 'post',
    data
  })
}

export const getGroupList = (data) => {
  return request({
    url: '/org/groupList',
    method: 'post',
    data
  })
}

export const saveGroup = (data) => {
  return request({
    url: '/org/saveGroup',
    method: 'post',
    data
  })
}

export const deleteGroup = (data) => {
  return request({
    url: '/org/deleteGroup',
    method: 'post',
    data
  })
}

export const getGroupEmployee = (data) => {
  return request({
    url: '/org/groupStaffList',
    method: 'post',
    data
  })
}

export const saveGroupEmployee = (data) => {
  return request({
    url: '/org/saveGroupStaff',
    method: 'post',
    data
  })
}

export const getMenuList = (data) => {
  return request({
    url: '/org/menuList',
    method: 'post',
    data
  })
}

export const saveMenu = (data) => {
  return request({
    url: '/org/saveMenu',
    method: 'post',
    data
  })
}

export const getUserMenuList = (data) => {
  return request({
    url: '/org/userMenuList',
    method: 'post',
    data
  })
}

export const saveEmployeeRole = (data) => {
  return request({
    url: '/org/saveDeptStaffRole',
    method: 'post',
    data
  })
}